const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
    entry: {
        index: ["./src/js/index.js", "./src/scss/index.scss","./src/scss/iconfont.scss"],
        find: ["./src/js/find.js", "./src/scss/find.scss","./src/scss/iconfont.scss"],
        classify: ["./src/js/classify.js", "./src/scss/classify.scss", "./src/scss/iconfont.scss"],
        product: ["./src/js/product.js", "./src/scss/product.scss", "./src/scss/iconfont.scss"],
        personal: ["./src/js/personal.js", "./src/scss/personal.scss", "./src/scss/iconfont.scss"],
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: "./src/html/index.html",
            filename: "index.html",
            chunks: ["index"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/find.html",
            filename: "find.html",
            chunks: ["find"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/classify.html",
            filename: "classify.html",
            chunks: ["classify"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/product.html",
            filename: "product.html",
            chunks: ["product"]
        }),
        new HtmlWebpackPlugin({
            template: "./src/html/personal.html",
            filename: "personal.html",
            chunks: ["personal"]
        }),
    ]
}
